//
//  Car.m
//  ocDay1_类和对象
//
//  Created by dllo on 16/5/20.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "Car.h"

@implementation Car


-(void)myCarInput{
    _name = @"保时捷";
    _number = 5675;
    _color = @"红";
}

-(void)myCarInputWithName:(NSString *)name withNumer:(NSInteger)number withColor:(NSString *)color{
    _name = name;
    _number = number;
    _color = color;
}


-(void)myCarPrint{
    NSLog(@"%@ %ld %@",_name , _number, _color);
}

//设置器 setter方法 为单一实例变量进行赋值
-(void)setName:(NSString *)name{
    _name = name;
}

//访问器 getter方法 为单一实例变量进行取值
-(NSString *)name{
    return _name;
}

-(void)setNumber:(NSInteger)number{
    _number = number;
}

-(NSInteger)number{
    return _number;
}

-(void)setColor:(NSString *)color{
    _color = color;
}

-(NSString *)color{
    return _color;
}




@end
